package msu.ml.core;

import java.util.*;

/**
 * The ApplicationSettings class contains static
 * settings which represent state settings on an
 * application wide basis.
 *
 * @author Reginald M Mead
 * @version 1.0
 */
public class ApplicationSettings
{
    private static ApplicationSettings instance 
        = new ApplicationSettings();

    private ApplicationSettings() 
    { 
        configuration = new HashMap<String, String>();
    }

    public static ApplicationSettings getInstance()
    {
        return instance;
    }

    public String getConfig(String setting)
    {
        if(!configuration.containsKey(setting))
            return null;

        return configuration.get(setting);
    }

    public void setConfig(String setting, String value)
    {
        configuration.put(setting, value);
    }

    private HashMap<String, String> configuration;
}
